<template>
	<div>
		<vhead></vhead>
		<div class="container" style="margin-top: 70px;">
			<div class="row">
				<div class="col-sm-9 film-left">
					<lifeList :dataJson="lifeAll"></lifeList>
				</div>
			</div>
		</div>	
		<vfoot></vfoot>
	</div>
</template>

<script>
	import Vhead from "../public/VHead"
	import VFoot from "../public/VFoot"
	import LifeList from "./LifeList"
	import Qs from 'qs'
	export default {
		data () {
		    return {
		    	lifeAll :[]
		    }
		},
		mounted ($route) {
	 		this.$nextTick(()=>{
	 			let _this = this; 
	 			//获取所有电影
        		_this.$axios({
	  				method:"post",
	  				url:"http://www.qixiaocheng.cn/public/index.php/index/Life/findAllLife",
	  			}).then(function(result){
					for(var i = 0;i<result.data.length;i++){
  						result.data[i]["imgUrl"] = 'public/uploads/'+result.data[i]["lifeUrl"] ;
  						result.data[i]["id"] = result.data[i]["lifeId"];
  						result.data[i]["name"] = result.data[i]["lifeTitle"];
  						result.data[i]["content"] = result.data[i]["lifeRead"];
  						result.data[i]["url"] = '/lifeDetail/'+result.data[i]["lifeId"];
  						_this.lifeAll.push(result.data[i])
  					}
	  			});
	 			
	 		})
 		},
		components:{
			"vhead" : Vhead,
			"vfoot" : VFoot,
			"lifeList" : LifeList
		}
	}
</script>

<style scoped>
</style>